namespace Brjnk.GpxExplorer.Workspace.BitmapExport
{
    using System;

    /// <summary>
    /// </summary>
    public abstract class GeoObjectLabel : ArrowLabel
    {
        public GeoObjectLabel(Page page, LabelStyle labelStyle, ArrowStyle arrowStyle)
            : base(page, labelStyle, arrowStyle) { OnFontSizeChanged(); }

        public abstract object DataObject { get; }

        protected override void OnFontSizeChanged()
        {
            TitleFontSize = Math.Max(1, this.Style.FontSize - 3);
            //TitleFontSize = 0;
        }

        private double titleFontSize;

        public double TitleFontSize
        {
            get { return titleFontSize; }
            private set { titleFontSize = value; OnPropertyChanged("TitleFontSize"); }
        }
    }
}